﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace CommonLib
{
	public class QuadTreeReference : MonoBehaviour
	{
		public int NodeInstance => TreeNodeInstanceId;
		[SerializeField]
		int TreeNodeInstanceId = 0;

		public void UpdateSpaceNode(QuadTreeNode node)
		{	
			this.TreeNodeInstanceId = node.InstanceId;	
		}

		private void OnDestroy()
		{
			//QuadTreeNodeHolder.Instance.GetNode(TreeNodeInstanceId)?.RemoveNodeReference(this);
		}
	}
}